#1  编写一个装饰器，能计算其他函数的运行时间；

import time

def set_fun(func):
   def call_fun(*args, **kwargs):
     start_time = time.time()
     func(*args, **kwargs)
     end_time = time.time()
     print('程序用时：%s秒' % int(end_time - start_time))
   return call_fun

@set_fun
def test():
   sum = 0
   for i in range(1000):
      for j in range(100):
          for k in range(100):
              sum += i * j * k

print('test')


test()
